import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: ()=> import('../views/HomeView.vue')
  },
  {
    path: '/login',
    name:'login',
    component:()=>import('../views/login.vue')
  },
  {
    path: '/register',
    name:'register',
    component:()=>import('../views/register.vue')
  },
  {
    path: '/center',
    name:'center',
    component:()=>import('../views/center.vue')
  },
  {
    path: '/adminlogin',
    name:'adminlogin',
    component:()=>import('../views/adminlogin.vue')
  },
  {
    path: '/changepass',
    name:'changepassword',
    component:()=>import('../views/changepassword.vue')
  },
  {
    path: '/changeinfor',
    name:'changeinformation',
    component:()=>import('../views/changeinformation.vue')
  },
  {
    path: '/order',
    name:'order',
    component:()=>import('../views/Order.vue')
  },
  {
    path: '/adminpage',
    name:'admin',
    component:()=>import('../views/adminpage.vue'),
  },
  {
    path: '/usermanage',
    name: 'user',
    component: () => import('../views/admin/usermanage.vue')
  },
  {
    path: '/details',
    name:'detail',
    component:()=>import('../views/details.vue')
  },
  {
    path:'/moviemanage',
    name:'movie',
    component:()=>import('../views/admin/moviemanage')
  },
  {
    path:'/comment',
    name:'comment',
    component:()=>import('../views/admin/statistics')
  },
  {
    path:'/hall',
    name:'hall',
    component:()=>import('../views/admin/hallmanage')
  },
  {
    path:'/timeline',
    name:'timeline',
    component:()=>import('../views/admin/timelinemana')
  },
  {
    path:'/daily',
    name:'daily',
    component:()=>import('../views/admin/daily')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
